package com.aaa.mapper;

import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface EachrtsMapper {
    @Select("select case sex when 1 then \"男\" else \"女\" END name,COUNT(1) value from front_user GROUP BY sex")
    List<Map<String,Object>> eachrtsSex();
    @Select("SELECT t.t_name,sum(IFNULL(v.play_amount ,0)) value from video_type t \n" +
            "LEFT JOIN video_video_type vvt on t.tid=vvt.v_type_id\n" +
            "LEFT JOIN video v on vvt.v_id=v.id GROUP BY t.t_name")
    List<Map<String,Object>> eachrtsType();
}
